import React from 'react'
import { Modal } from 'antd-mobile';

export default function Com({ showModal, onDelete }) {

  return (
    <>
      <Modal
        popup
        visible={ showModal}
        onClose={() => {
          onDelete()
        }}
        animationType="slide-up"
        // afterClose={() => { alert('afterClose'); }}
      >
        <p style={{ fontSize: '0.43rem', color: 'red', textAlign: 'center', padding: '0.54rem 0 0.58rem 0', borderRadius: '0.5rem 0.5rem 0 0', marginBottom: '0.22rem', background: '#fff' }} onClick={() => {
         onDelete('delete')
        }}>清空聊天记录</p>
        <p style={{ fontSize: '0.43rem', textAlign: 'center', padding: '0.51rem 0 0.58rem 0', background: '#fff' }} onClick={() => {
          onDelete(false)
        }}>取消</p>

      </Modal>
    </>
  )
}